package com.yww.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yww.entity.RoleModules;
import com.yww.entity.Roles;
import com.yww.mapper.RolesMapper;
import com.yww.service.IRolesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2020-05-19
 */

@Service
public class RolesServiceImpl extends ServiceImpl<RolesMapper, Roles> implements IRolesService {
    @Resource
    RolesMapper rolesMapper;

    @Override
    public List<Roles> getRightRole(Integer userId) {
        return rolesMapper.getRightRole(userId);
    }

    @Override
    public List<Roles> getRoleName(Roles roles) {
        return rolesMapper.getRoleName(roles);
    }

    @Override
    public List<RoleModules> getRolesContainsMod(Integer roleId) {
        return rolesMapper.getRolesContainsMod(roleId);
    }
}
